﻿using DotNetCommon;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace ExcelUtil.Test
{
    public class TestBase
    {
        protected DataTable GetTable()
        {
            var dt = new DataTable();
            dt.Columns.Add("序号");
            dt.Columns.Add("姓名");
            dt.Columns.Add("年龄");
            dt.Columns.Add("生日");
            dt.Columns.Add("分数");
            dt.Columns.Add("地址");
            for (int i = 0; i < 50; i++)
            {
                var row = dt.NewRow();
                row["序号"] = i + 1;
                row["姓名"] = $"小明{i + 1}";
                row["年龄"] = $"{RandomHelper.Next(3) + 18}";
                row["生日"] = DateTime.Parse("1998-02-02");
                row["分数"] = RandomHelper.Next(70.0) + 40;
                row["地址"] = "天明路";
                dt.Rows.Add(row);
            }
            return dt;
        }
    }
}
